/*
let collectApp = new Vue({
    el:'#collectApp',
    methods:{
        collectQuestion:function () {
            let questionId = location.search.substring(1);
            let data = {
                questionId:questionId,
            }
            $.ajax({
                url:'/api/v1/userCollections/collect',
                data:data,
                type:'post',
                success:function (json){
                    if(json.state ==2000){
                        alert("收藏成功");
                    }else{
                        alert(json.message);
                    }
                }
            });
        }
    }
});*/
$("#collect").click(function() {
    let questionId = location.search.substring(1);
    let data = {
        questionId:questionId,
    }
    $.ajax({
        url:'/api/v1/userCollections/collect',
        data:data,
        type:'post',
        success:function (json){
            if(json.state ==2000){
                alert("收藏成功");
            }else{
                alert(json.message);
            }
        }
    });
})

